package routers

import (
	"github.com/gin-gonic/gin"
	"shop-admin/controller"
	"shop-security/preAuthorize"
)

func privatePicture(router *gin.RouterGroup) {
	//素材管理-图片接口
	pictureController := &controller.PictureController{}
	api := router.Group("/picture")
	{
		api.GET("/page", preAuthorize.HasPermission("sys:picture:page"), pictureController.Page)
		api.GET("", preAuthorize.HasPermission("sys:picture:info"), pictureController.AttIds)
		api.PUT("/refactor", preAuthorize.HasPermission("sys:picture:refactor"), pictureController.Refactor)
		api.PUT("/updatePid", preAuthorize.HasPermission("sys:picture:move"), pictureController.UpdatePid)
		api.DELETE("/delete", preAuthorize.HasPermission("sys:picture:delete"), pictureController.Delete)
		api.POST("/image", preAuthorize.HasPermission("sys:picture:upload"), pictureController.Image)

	}
}
